toString

open fun toString(@Nullable o: Any, @Nullable nullDefault: String): String(source)

Returns the result of calling toString on the first argument if the first argument is not null and returns the second argument otherwise.

Return

the result of calling toString on the first argument if it is not null and the second argument otherwise.

Parameters

o

an object

nullDefault

string to return if the first argument is null